<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administracion</title>
<link rel="stylesheet" type="text/css"  href="css/admin.css"/>
</head><body>

<div>
<h1>Secciones</h1>
<h2>Listado de Secciones</h2>
<?php
require("include/user-info.php");
	
require("include/conection.php");

$result = mysql_query("SELECT id , titulo, contenido, seccion FROM contenido WHERE 1");
if (!$result) {
	die('Consulta inválida: ' . mysql_error());
}
else 
{
	while($row = mysql_fetch_array($result))
	{
		echo "<div class=\"line\"></div>"; 
		echo "<a href=\"contenido-updateForm.php?id=". $row['id']."\">Editar</a><br />"; 
		echo "<strong>".$row['seccion']."</strong>";
		echo "<p>";
		echo "<strong>".$row['titulo'] ."</strong><br/>";
		echo "" . nl2br($row['contenido'])."<br/>";
		echo "</p>"; 			
	}		
}
mysql_close($con);   
?>

</div>
</body>
</html>